home *** CD-ROM | disk | FTP | other *** search
/ Champak 29 / Volume 29 - JOGO DISK .iso / Games / jungle_adventure.swf / scripts / __Packages / GamePoint.as < prev    next >
Text File  |  2006-11-29  |  588b  |  26 lines

  1. class GamePoint extends GameCollectable
  2. {
  3.    var assetID = "point";
  4.    var soundID = "point";
  5.    var value = 10;
  6.    var editor_isItem = true;
  7.    var editor_name = "GamePoint";
  8.    function GamePoint(value)
  9.    {
  10.       super();
  11.    }
  12.    function onAddToWorld()
  13.    {
  14.       !this.world[this.assetID] ? (this.world[this.assetID] = 1) : this.world[this.assetID]++;
  15.    }
  16.    function setCollected(obj)
  17.    {
  18.       if(!obj.shiftScore(this.value))
  19.       {
  20.          return undefined;
  21.       }
  22.       GameSound.playSound(this.soundID);
  23.       this.world.removeObject(this);
  24.    }
  25. }
  26.